-
Notifications
You must be signed in to change notification settings - Fork 0
Format #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format #23
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| this.archiveList = this.shadowRoot?.getElementById( | ||
| "archive-list", | ||
| ) as ArgoArchiveList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The code is using optional chaining with shadowRoot?.getElementById() but doesn't handle the case where the element might not be found. Add a null check to prevent potential runtime errors. [possible issue, importance: 7]
| this.archiveList = this.shadowRoot?.getElementById( | |
| "archive-list", | |
| ) as ArgoArchiveList; | |
| const archiveListElement = this.shadowRoot?.getElementById("archive-list"); | |
| if (!archiveListElement) { | |
| console.error("Archive list element not found in the shadow DOM"); | |
| return; | |
| } | |
| this.archiveList = archiveListElement as ArgoArchiveList; |
| , | ||
| md-elevated-card { | ||
| display: block; | ||
| margin: 1rem 0; | ||
| padding: 0; | ||
| overflow: visible; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: There's a syntax error in the CSS with a leading comma before md-elevated-card selector, which will cause the style rule to be ignored. Remove the comma to fix the CSS syntax. [possible issue, importance: 9]
| , | |
| md-elevated-card { | |
| display: block; | |
| margin: 1rem 0; | |
| padding: 0; | |
| overflow: visible; | |
| } | |
| md-elevated-card { | |
| display: block; | |
| margin: 1rem 0; | |
| padding: 0; | |
| overflow: visible; | |
| } |
| const statusline = `${method} ${url.slice( | ||
| urlParsed.origin.length, | ||
| )} HTTP/1.1`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The statusline constant is defined but never used in the surrounding code. This variable appears to be important for creating the HTTP request record but is not being passed to the WARCRecord.create function. Ensure this value is properly utilized in the request record creation. [possible issue, importance: 3]
| const statusline = `${method} ${url.slice( | |
| urlParsed.origin.length, | |
| )} HTTP/1.1`; | |
| const urlParsed = new URL(url); | |
| const statusline = `${method} ${url.slice( | |
| urlParsed.origin.length, | |
| )} HTTP/1.1`; | |
| const reqRecord = WARCRecord.create( | |
| { | |
| warcType: "request", | |
| warcTargetURI: url, | |
| warcDate: warcDate, | |
| warcRecordID: reqId, | |
| statusline: statusline, | |
| // other properties... | |
| }, | |
| // other parameters... | |
| ); |
PR Type
Enhancement
Description
Added status card showing current page info
Updated tab change status updates
Fixed element selection in archive list
Improved code formatting and layout
Changes walkthrough 📝
5 files
Reorganized CSS styles for card containerImproved code formatting for better readabilityFormatted multiline string concatenationsImproved template string formattingFormatted function parameters for better readability5 files
Added sidepanel port and tab change status updatesAdded favicon and page title to status updatesImplemented status card and UI improvementsAdded utility functions for UI displayRestructured HTML for new layout